package com.gzx.plugin.fin.tech.controller;

import com.gzx.plugin.fin.tech.service.GzxFinTechService;
import jakarta.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zjt
 * @description
 * @date 2025/4/2 18:20
 */
@RestController
@RequestMapping("/api/fin-tech")
@RequiredArgsConstructor
public class GzxFinTechController {

    private final GzxFinTechService finTechService;

    @PostMapping("/score/forward")
    public String getScore(@RequestBody String reqBody, HttpServletRequest request) {
        return finTechService.forwardScoring(reqBody, request);
    }

    @PostMapping("/score/backtrack")
    public String getBacktrackScore(@RequestBody String reqBody, HttpServletRequest request) {
        return finTechService.backtrackScoring(reqBody, request);
    }
}
